# Maintainer: Andy Postnikov <apostnikov@gmail.com>
pkgname=py3-duviz
pkgver=3.2.0
pkgrel=2
pkgdesc="A command-line tool to visualize disk space usage."
url="https://github.com/soxofaan/duviz"
arch="noarch"
license="MIT"
depends="python3"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/soxofaan/duviz/archive/v$pkgver.tar.gz"
builddir="$srcdir/duviz-$pkgver"

build() {
	gpep517 build-wheel --wheel-dir .dist --output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest -v
}

package() {
	python3 -m installer -d "$pkgdir" .dist/*.whl
}

sha512sums="
901603e2c4f82074752762b36057836bebec47f67837bb9d472e2c20a90c06b481fc45f9b69c1ebd02f61706b18d9970e4979f51018a03796c8464da78d85172  py3-duviz-3.2.0.tar.gz
"
